#!/bin/bash
trap 'echo Abort ; exit 1' ERR

cd /opt/9263/rootfs/
echo Init ScratchBox2.
[ -z `which sb2-init` ] && { echo sb2-init not found. Abort. ; exit 1 ; }
[ -d ~/.scratchbox2/ ] && { echo ~/.scratchbox2/ exists. will not overwrite. ; exit 1 ; }
TARGET=arm-none-linux-gnueabi
sb2-init -c `which qemu-arm` 9263 ${TARGET}-gcc
